package com.demo.test;

public class ExtendsDemo {
    public static void main(String[] args) {
        Girl g = new Girl();
        g.say();
        System.out.println("----------------");
        g.name = "girl";
        g.say();
    }
}

class Person{
    String name ="human";
    public Person(){}
    public Person(String name) {
        this.name = name;
        System.out.println("name="+name);
    }


    public void say(){
        System.out.println("father person");
    }
}
class Girl extends Person{
    String name;
    public Girl(){}

    public void say(){
        super.say();
        System.out.println(name + ":son girl");
        System.out.println(this.name + ":this.son girl");
        System.out.println(super.name + ":super.son girl");
    }
}